<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>跑熊</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      @keyframes bg {
        0% {
        }
        100% {
          background-position: 100% 0;
        }
      }
      @keyframes be {
        0% {
        }
        100% {
          background-position: -1600px 0;
        }
      }
      @keyframes pos {
        0% {
          left: 0;
        }
        100% {
          left: 50%;
          transform: translateX(-50%);
        }
      }
      .out {
        width: 100%;
      }
      .img1,
      .img2 {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 44%;
        animation: bg 15s linear infinite;
      }
      .img2 {
        bottom: 150px;
        background-image: url("bg2.png");
        animation-duration: 20s;
      }
      .img1 {
        background-image: url("bg1.png");
      }
      .bear {
        position: absolute;
        bottom: 50px;
        height: 100px;
        width: 200px;
        background-image: url("奔跑的熊.png");
        animation: be 1s steps(8) infinite, pos 10s linear forwards;
      }
    </style>
  </head>
  <body>
    <div class="out">
      <div class="img2"></div>
      <div class="img1"></div>
      <div class="bear"></div>
    </div>
  </body>
</html>
